﻿<controls:ChildWindow x:Class="SLWebApp.ChildWindows.ChildWindow_Voyage"
                       xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
                      xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
            Width="710" Height="170" Loaded="ChildWindow_Loaded" Closing="ChildWindow_Closing"
           Title="新增/修改航次" FontFamily="Comic Sans MS" FontSize="12">
    <toolkit:BusyIndicator x:Name="progressbar" IsBusy="False" >
        <Grid x:Name="LayoutRoot" Margin="2">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <StackPanel>
                <Border BorderThickness="1" Height="30" BorderBrush="#b4b4b4" CornerRadius="1" >
                    <Border.Background>
                        <ImageBrush ImageSource="/SLWebApp;component/img/operate_box_bg.png" />
                    </Border.Background>
                    <StackPanel  Orientation="Horizontal" HorizontalAlignment="Left" >
                        <TextBlock Text="操作：" Padding="10,6" Height="30" Width="50"/>
                        <Image Width="16" Height="16" Source="/SLWebApp;component/img/icon_save.png"></Image>
                        <TextBlock x:Name="btnSave" MouseLeftButtonDown="btnSave_MouseLeftButtonDown" Padding="3,6" Cursor="Hand">保存</TextBlock>
                    </StackPanel>
                </Border>

                <Border BorderThickness="0" Height="5" >
                </Border>
                <!-- 靠泊表格内容-->
                <Border BorderThickness="1" BorderBrush="#b4b4b4" CornerRadius="1" >

                    <Grid>
                        <Grid.RowDefinitions >
                            <RowDefinition Height="30" />
                            <RowDefinition Height="30" />
                            <RowDefinition Height="30" />
                        </Grid.RowDefinitions >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition  Width="95" />
                            <ColumnDefinition Width="135"/>
                            <ColumnDefinition  Width="80" />
                            <ColumnDefinition Width="145"/>
                            <ColumnDefinition Width="80" />
                            <ColumnDefinition Width="145"/>
                            <ColumnDefinition Width="11*" />
                        </Grid.ColumnDefinitions>


                        <TextBlock Padding="3,3" Height="22" Grid.Row="0" Grid.Column="0"  HorizontalAlignment="Right">航线：</TextBlock>
                        <ComboBox x:Name="comboxSeaRoutes" Grid.Row="0" Grid.Column="1" Height="22" SelectionChanged="comboxSeaRoutes_SelectionChanged">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <!--<TextBlock Text="{Binding Path=ID}" Width="40" />-->
                                        <!--航线代码-->
                                        <TextBlock Text="{Binding Path=RouteName}" Width="Auto" />
                                        <!--航线名称-->
                                    </StackPanel>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>

                        <TextBlock Padding="3,3" Height="22" Grid.Row="0" Grid.Column="2"  HorizontalAlignment="Right">服务航线：</TextBlock>

                        <ComboBox x:Name="comboxServiceLine" SelectionChanged="comboxServiceLine_SelectionChanged"  Grid.Row="0" Grid.Column="3" Height="22">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <!--<TextBlock Text="{Binding Path=ID}" Width="60" />-->
                                        <!--航线代码-->
                                        <TextBlock Text="{Binding Path=RouteName}" Width="Auto" />
                                        <!--航线名称-->
                                        <TextBlock Text="{Binding Path=ChildRouteName}" Width="Auto" />
                                    </StackPanel>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>

                        <TextBlock Padding="3,3" Height="22" Grid.Row="0" Grid.Column="4"  HorizontalAlignment="Right">班期：</TextBlock>
                        <ComboBox x:Name="comboxVesselDate" Grid.Row="0" Grid.Column="5" Height="22">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="{Binding Path=RouteName}" Width="Auto" />
                                    </StackPanel>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>

                        <TextBlock Padding="3,3" Height="22" Grid.Row="1" Grid.Column="0"  HorizontalAlignment="Right">进出口标志：</TextBlock>
                        <RadioButton Content="进口" Name="rbtnImport"  Grid.Row="1" GroupName="voyage"  Grid.Column="1" Height="16" HorizontalAlignment="Left" IsChecked="True"  Margin="10,0,0,0"   />
                        <RadioButton Content="出口" Name="rbtnExport"  Grid.Row="1"  GroupName="voyage" Grid.Column="1" Height="16" HorizontalAlignment="Left"  Margin="60,0,0,0"   />

                        <TextBlock Padding="3,3" Height="22" Grid.Row="1" Grid.Column="2"  HorizontalAlignment="Right">航次：</TextBlock>
                        <TextBox x:Name="txtImportVoyage" Height="22" Grid.Row="1" Grid.Column="3"/>

                        <TextBlock Padding="3,3" Height="22" Grid.Row="1" Grid.Column="4"  HorizontalAlignment="Right">内外贸标志：</TextBlock>
                        <ComboBox x:Name="comboxINTRADE"  Grid.Row="1" Grid.Column="5" Height="22">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="{Binding Path=RV_MEANING}" Width="Auto" />
                                    </StackPanel>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>

                        <TextBlock Padding="3,3" Height="22" Grid.Row="2" Grid.Column="0"  HorizontalAlignment="Right">集装箱(TEU)：</TextBlock>
                        <TextBlock x:Name="txtCountTen"  Padding="3,3" Height="22" Grid.Row="2" Grid.Column="1" ></TextBlock>

                        <TextBlock Padding="3,3" Height="22" Grid.Row="2" Grid.Column="2"  HorizontalAlignment="Right">散货(吨)：</TextBlock>
                        <TextBlock x:Name="txtCountTen_Plan" Padding="3,3" Height="22" Grid.Row="2" Grid.Column="3" ></TextBlock>

                    </Grid>
                </Border>
            </StackPanel>
        </Grid>
    </toolkit:BusyIndicator>
</controls:ChildWindow>